package com.sun.talk

import com.sun.talk.mapper.UserMapper
import org.junit.Test
import org.junit.runner.RunWith
import org.springframework.boot.test.context.SpringBootTest
import org.springframework.test.context.junit4.SpringRunner
import org.junit.Assert
import javax.annotation.Resource


@RunWith(SpringRunner::class)
@SpringBootTest
class TalkApplicationTests {
    @Resource
    private lateinit var userDao: UserMapper
    @Test
    fun testSelect() {
        println("----- selectAll method test ------")
        val userList = userDao.selectList(null)
        Assert.assertEquals(5, userList.size)
        userList.forEach{
            println(it)
        }
    }

}
